#例10.11打开一个文件并写入”Hello World”
filename = 'my_file.txt'
mode = 'w'
writer = open(filename, mode)
writer.write('Hello ')
writer.write('World')
writer.close()
